﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;

namespace Mars.EnCor.Config
{
    public class NameTypeConfigElement : NamedConfigurationElement
    {
        private const string Config_Type = "type";

        [ConfigurationProperty(Config_Type, IsRequired=true)]
        public virtual string TypeName
        {
            get
            {
                return (string)this[Config_Type];
            }
        }

        public Type Type
        {
            get { return Type.GetType(TypeName, false); }

        }
    }
}
